package com.woniuxy.micropermissionserver.permissionmanage.controller;

import com.woniuxy.microcommonserver.bean.permission_hcz.Permission;
import com.woniuxy.microcommonserver.res.ResultMsg;
import com.woniuxy.micropermissionserver.permissionmanage.service.IPermissionService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("permission")
public class PermissionController {


    @Resource
    private IPermissionService permissionService;

    @PostMapping("add")
    public ResultMsg addPermission(Permission permission) {
        permissionService.savePermission(permission);
        return new ResultMsg(200, "success", null);
    }

}
